
DUMP=DUMP
MODE=NONE
TILE_MODEL=TILE_MODEL

VERDI_PATH = $(VERDI_HOME)

default: clean  vcs_run   

vcs_run: 
	echo "\`define  $(DUMP)       "  >   define.sv
	echo "\`define  $(MODE)       "  >>  define.sv
	vcs -full64   -LDFLAGS -Wl,--no-as-needed -lca  -kdb   -timescale=1ns/1ps  -P  $(VERDI_PATH)/share/PLI/VCS/LINUX64/novas.tab  $(VERDI_PATH)/share/PLI/VCS/LINUX64/pli.a +vcs+lic+wait   -sverilog    -f tb.vc -top tb -debug_all   -cm line+cond+fsm+tgl -cm_dir cov_result/my_cov_info_$(MODE)   -assert svaext  +lint=all,noVCDE,noNS     -l vcs_com.log
	./simv   -debug_all  -cm line+cond+fsm+tgl -cm_dir cov_result/my_cov_info_$(MODE)     -l vcs_sim_$(MODE).log
	


clean:
	rm -rf simv* *.fsdb*  mac* 
	rm -rf csrc*   *.vpd   *.log 
	rm -rf verdiLog  cov_result mac*   *.log *.h    ucli.key  


emacs:
	emacs   --batch   rst_gen.v             -f verilog-auto     -f save-buffer 	
	emacs   --batch   clk_gen.v             -f verilog-auto     -f save-buffer 
	emacs   --batch   driver.sv             -f verilog-auto     -f save-buffer 
	emacs   --batch   monitor.sv             -f verilog-auto     -f save-buffer 
	emacs   --batch   tb.sv             -f verilog-auto     -f save-buffer 	


verdi_vc:
	##source /home/haorui/.bashrc_2015
	verdi -sv -f tb.vc &
verdi:
	verdi -elab simv.daidir/kdb &
	

